package com.cd.university.service;

import com.cd.university.service.impl.DefaultMessageServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 陈栋
 * @create 2021/11/24 14:21
 */
@Configuration
public class ServiceConfiguration {

    @Bean
    @ConditionalOnMissingBean(name = "messageService")
    public MessageService messageService() {
        return new DefaultMessageServiceImpl();
    }
}
